<?xml version="1.0" encoding="UTF-8"?>
<definitions 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="asyncScript" isExecutable="true">
  
    <startEvent id="theStart" />
    <sequenceFlow sourceRef="theStart" targetRef="script" />
    
    <scriptTask id="script" camunda:async="true" scriptFormat="juel">
    	<script>#{execution.setVariable('invoked','true')}</script>
    </scriptTask>
    
    <sequenceFlow sourceRef="script" targetRef="wait" />
    
    <receiveTask id="wait" />
    
    <sequenceFlow sourceRef="wait" targetRef="theEnd" />
        
    <endEvent id="theEnd" />
    
  </process>

</definitions>
